package com.vcc.data.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.vcc.data.base.entity.BaseEntity;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
@Table(value = "vcc_transaction")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Transaction extends BaseEntity implements Serializable {

    @Column(comment = "交易ID", value = "tran_id")
    private String tranId;

    @Column(comment = "原交易ID", value = "original_tran_id")
    private String originalTranId;

    @Column(comment = "交易ID", value = "channel_tran_id")
    private String channelTranId;

    @Column(comment = "原交易ID", value = "original_channel_tran_id")
    private String originalChannelTranId;

    @Column(comment = "结算交易ID", value = "settle_tran_id")
    private String settleTranId;

    @Column(comment = "结算交易ID", value = "channel_settle_tran_id")
    private String channelSettleTranId;

    @Column(comment = "卡号", value = "card_number")
    private String cardNumber;

    @Column(comment = "渠道", value = "channel")
    private String channel;

    @Column(comment = "卡品ID", value = "card_type_id")
    private Long cardTypeId;

    @Column(comment = "用户卡Id", value = "user_card_id")
    private Long userCardId;

    @Column(comment = "渠道卡id", value = "channel_card_id")
    private String channelCardId;

    @Column(comment = "用户ID", value = "user_id")
    private Long userId;

    @Column(comment = "商户名", value = "merchant_name")
    private String merchantName;

    @Column(comment = "交易日期", value = "tran_date")
    private Date tranDate;

    @Column(comment = "记账金额", value = "billing_amount")
    private BigDecimal billingAmount;

    @Column(comment = "记账币种", value = "billing_currency")
    private String billingCurrency;

    @Column(comment = "结算金额", value = "settle_amount")
    private BigDecimal settleAmount;

    @Column(comment = "结算币种", value = "settle_currency")
    private String settleCurrency;

    @Column(comment = "结算日期", value = "settle_date")
    private Date settleDate;

    @Column(comment = "记账日期", value = "post_date")
    private Date postDate;

    @Column(comment = "商户金额", value = "merchant_amount")
    private BigDecimal merchantAmount;

    @Column(comment = "商户币种", value = "merchant_currency")
    private String merchantCurrency;

    @Column(comment = "交易类型", value = "transaction_type")
    private String transactionType;

    @Column(comment = "交易备注", value = "remark")
    private String remark;

    @Column(comment = "交易状态", value = "status")
    private String status;

    @Column(comment = "是否清算", value = "has_clear")
    private Boolean hasClear;

    @Column(comment = "是否有撤销", value = "has_reversal")
    private Boolean hasReversal;

    @Column(comment = "是否有退款", value = "has_refund")
    private Boolean hasRefund;

    @Column(comment = "mcc", value = "mcc")
    private String mcc;

    @Column(comment = "商户国家", value = "merchant_country")
    private String merchantCountry;

    @Column(comment = "商户城市", value = "merchant_city")
    private String merchantCity;

    @Column(comment = "卡类型", value = "card_type")
    private String cardType;

    @Column(comment = "手续费", value = "fee")
    private BigDecimal fee;

    @Column(comment = "手续费币种", value = "fee_currency")
    private String feeCurrency;

    @Column(comment = "手续费信息", value = "fee_info")
    private String feeInfo;

    @Column(comment = "响应码", value = "code")
    private String code;

    @Column(comment = "用户账号", value = "account", ignore = true)
    private String account;

    @Column(comment = "代理账号", value = "dealer_account", ignore = true)
    private String dealerAccount;

    @Column(comment = "共享账户ID", value = "share_account_id")
    private Long shareAccountId;
}
